﻿using System;
using System.Collections;
using System.IO;
using UnityEngine;

namespace RenderHeads.Media.AVProVideo
{
	// Token: 0x0200001F RID: 31
	[AddComponentMenu("AVPro Video/Media Player", -100)]
	[HelpURL("http://renderheads.com/product/avpro-video/")]
	public class MediaPlayer : MonoBehaviour
	{
		// Token: 0x17000013 RID: 19
		// (get) Token: 0x060000C5 RID: 197 RVA: 0x00008778 File Offset: 0x00006978
		// (set) Token: 0x060000C6 RID: 198 RVA: 0x00008780 File Offset: 0x00006980
		public bool DisplayDebugGUI
		{
			get
			{
				return this.m_DebugGui;
			}
			set
			{
				this.m_DebugGui = value;
			}
		}

		// Token: 0x17000014 RID: 20
		// (get) Token: 0x060000C7 RID: 199 RVA: 0x0000878C File Offset: 0x0000698C
		// (set) Token: 0x060000C8 RID: 200 RVA: 0x00008794 File Offset: 0x00006994
		public bool DisplayDebugGUIControls
		{
			get
			{
				return this.m_DebugGuiControls;
			}
			set
			{
				this.m_DebugGuiControls = value;
			}
		}

		// Token: 0x17000015 RID: 21
		// (get) Token: 0x060000C9 RID: 201 RVA: 0x000087A0 File Offset: 0x000069A0
		// (set) Token: 0x060000CA RID: 202 RVA: 0x000087A8 File Offset: 0x000069A8
		public bool Persistent
		{
			get
			{
				return this.m_Persistent;
			}
			set
			{
				this.m_Persistent = value;
			}
		}

		// Token: 0x17000016 RID: 22
		// (get) Token: 0x060000CB RID: 203 RVA: 0x000087B4 File Offset: 0x000069B4
		public IMediaInfo Info
		{
			get
			{
				return this.m_Info;
			}
		}

		// Token: 0x17000017 RID: 23
		// (get) Token: 0x060000CC RID: 204 RVA: 0x000087BC File Offset: 0x000069BC
		public IMediaControl Control
		{
			get
			{
				return this.m_Control;
			}
		}

		// Token: 0x17000018 RID: 24
		// (get) Token: 0x060000CD RID: 205 RVA: 0x000087C4 File Offset: 0x000069C4
		public IMediaPlayer Player
		{
			get
			{
				return this.m_Player;
			}
		}

		// Token: 0x17000019 RID: 25
		// (get) Token: 0x060000CE RID: 206 RVA: 0x000087CC File Offset: 0x000069CC
		public virtual IMediaProducer TextureProducer
		{
			get
			{
				return this.m_Texture;
			}
		}

		// Token: 0x1700001A RID: 26
		// (get) Token: 0x060000CF RID: 207 RVA: 0x000087D4 File Offset: 0x000069D4
		public virtual IMediaSubtitles Subtitles
		{
			get
			{
				return this.m_Subtitles;
			}
		}

		// Token: 0x1700001B RID: 27
		// (get) Token: 0x060000D0 RID: 208 RVA: 0x000087DC File Offset: 0x000069DC
		public MediaPlayerEvent Events
		{
			get
			{
				if (this.m_events == null)
				{
					this.m_events = new MediaPlayerEvent();
				}
				return this.m_events;
			}
		}

		// Token: 0x1700001C RID: 28
		// (get) Token: 0x060000D1 RID: 209 RVA: 0x000087FC File Offset: 0x000069FC
		public bool VideoOpened
		{
			get
			{
				return this.m_VideoOpened;
			}
		}

		// Token: 0x1700001D RID: 29
		// (get) Token: 0x060000D2 RID: 210 RVA: 0x00008804 File Offset: 0x00006A04
		public MediaPlayer.OptionsWindows PlatformOptionsWindows
		{
			get
			{
				return this._optionsWindows;
			}
		}

		// Token: 0x1700001E RID: 30
		// (get) Token: 0x060000D3 RID: 211 RVA: 0x0000880C File Offset: 0x00006A0C
		public MediaPlayer.OptionsMacOSX PlatformOptionsMacOSX
		{
			get
			{
				return this._optionsMacOSX;
			}
		}

		// Token: 0x1700001F RID: 31
		// (get) Token: 0x060000D4 RID: 212 RVA: 0x00008814 File Offset: 0x00006A14
		public MediaPlayer.OptionsIOS PlatformOptionsIOS
		{
			get
			{
				return this._optionsIOS;
			}
		}

		// Token: 0x17000020 RID: 32
		// (get) Token: 0x060000D5 RID: 213 RVA: 0x0000881C File Offset: 0x00006A1C
		public MediaPlayer.OptionsTVOS PlatformOptionsTVOS
		{
			get
			{
				return this._optionsTVOS;
			}
		}

		// Token: 0x17000021 RID: 33
		// (get) Token: 0x060000D6 RID: 214 RVA: 0x00008824 File Offset: 0x00006A24
		public MediaPlayer.OptionsAndroid PlatformOptionsAndroid
		{
			get
			{
				return this._optionsAndroid;
			}
		}

		// Token: 0x17000022 RID: 34
		// (get) Token: 0x060000D7 RID: 215 RVA: 0x0000882C File Offset: 0x00006A2C
		public MediaPlayer.OptionsWindowsPhone PlatformOptionsWindowsPhone
		{
			get
			{
				return this._optionsWindowsPhone;
			}
		}

		// Token: 0x17000023 RID: 35
		// (get) Token: 0x060000D8 RID: 216 RVA: 0x00008834 File Offset: 0x00006A34
		public MediaPlayer.OptionsWindowsUWP PlatformOptionsWindowsUWP
		{
			get
			{
				return this._optionsWindowsUWP;
			}
		}

		// Token: 0x17000024 RID: 36
		// (get) Token: 0x060000D9 RID: 217 RVA: 0x0000883C File Offset: 0x00006A3C
		public MediaPlayer.OptionsWebGL PlatformOptionsWebGL
		{
			get
			{
				return this._optionsWebGL;
			}
		}

		// Token: 0x060000DA RID: 218 RVA: 0x00008844 File Offset: 0x00006A44
		private void Awake()
		{
			if (this.m_Persistent)
			{
				UnityEngine.Object.DontDestroyOnLoad(base.gameObject);
			}
		}

		// Token: 0x060000DB RID: 219 RVA: 0x0000885C File Offset: 0x00006A5C
		protected void Initialise()
		{
			BaseMediaPlayer baseMediaPlayer = this.CreatePlatformMediaPlayer();
			if (baseMediaPlayer != null)
			{
				this.m_Control = baseMediaPlayer;
				this.m_Texture = baseMediaPlayer;
				this.m_Info = baseMediaPlayer;
				this.m_Player = baseMediaPlayer;
				this.m_Subtitles = baseMediaPlayer;
				this.m_Dispose = baseMediaPlayer;
				if (!MediaPlayer.s_GlobalStartup)
				{
					Helper.LogInfo(string.Format("Initialising AVPro Video (script v{0} plugin v{1}) on {2}/{3} (MT {4}) on {5}", new object[]
					{
						"1.6.10",
						baseMediaPlayer.GetVersion(),
						SystemInfo.graphicsDeviceName,
						SystemInfo.graphicsDeviceVersion,
						SystemInfo.graphicsMultiThreaded,
						Application.platform
					}), null);
					MediaPlayer.s_GlobalStartup = true;
				}
			}
		}

		// Token: 0x060000DC RID: 220 RVA: 0x00008904 File Offset: 0x00006B04
		private void Start()
		{
			if (this.m_Control == null)
			{
				this.Initialise();
			}
			if (this.m_Control != null)
			{
				if (this.m_AutoOpen)
				{
					this.OpenVideoFromFile();
					if (this.m_LoadSubtitles && this.m_Subtitles != null && !string.IsNullOrEmpty(this.m_SubtitlePath))
					{
						this.EnableSubtitles(this.m_SubtitleLocation, this.m_SubtitlePath);
					}
				}
				this.StartRenderCoroutine();
			}
		}

		// Token: 0x060000DD RID: 221 RVA: 0x00008980 File Offset: 0x00006B80
		public bool OpenVideoFromFile(MediaPlayer.FileLocation location, string path, bool autoPlay = true)
		{
			this.m_VideoLocation = location;
			this.m_VideoPath = path;
			this.m_AutoStart = autoPlay;
			if (this.m_Control == null)
			{
				this.Initialise();
			}
			return this.OpenVideoFromFile();
		}

		// Token: 0x060000DE RID: 222 RVA: 0x000089B0 File Offset: 0x00006BB0
		public bool OpenVideoFromBuffer(byte[] buffer, bool autoPlay = true)
		{
			this.m_VideoLocation = MediaPlayer.FileLocation.AbsolutePathOrURL;
			this.m_VideoPath = "buffer";
			this.m_AutoStart = autoPlay;
			if (this.m_Control == null)
			{
				this.Initialise();
			}
			return this.OpenVideoFromBufferInternal(buffer);
		}

		// Token: 0x17000025 RID: 37
		// (get) Token: 0x060000DF RID: 223 RVA: 0x000089E4 File Offset: 0x00006BE4
		public bool SubtitlesEnabled
		{
			get
			{
				return this.m_LoadSubtitles;
			}
		}

		// Token: 0x17000026 RID: 38
		// (get) Token: 0x060000E0 RID: 224 RVA: 0x000089EC File Offset: 0x00006BEC
		public string SubtitlePath
		{
			get
			{
				return this.m_SubtitlePath;
			}
		}

		// Token: 0x17000027 RID: 39
		// (get) Token: 0x060000E1 RID: 225 RVA: 0x000089F4 File Offset: 0x00006BF4
		public MediaPlayer.FileLocation SubtitleLocation
		{
			get
			{
				return this.m_SubtitleLocation;
			}
		}

		// Token: 0x060000E2 RID: 226 RVA: 0x000089FC File Offset: 0x00006BFC
		public bool EnableSubtitles(MediaPlayer.FileLocation fileLocation, string filePath)
		{
			bool result = false;
			if (this.m_Subtitles != null)
			{
				if (!string.IsNullOrEmpty(filePath))
				{
					string platformFilePath = this.GetPlatformFilePath(MediaPlayer.GetPlatform(), ref filePath, ref fileLocation);
					bool flag = true;
					if (platformFilePath.Contains("://"))
					{
						flag = false;
					}
					if (flag && !File.Exists(platformFilePath))
					{
						GlobalData.Debug_LogError("[AVProVideo] Subtitle file not found: " + platformFilePath, this);
					}
					else
					{
						Helper.LogInfo("Opening subtitles " + platformFilePath, this);
						this.m_previousSubtitleIndex = -1;
						try
						{
							if (platformFilePath.Contains("://"))
							{
								if (this.m_loadSubtitlesRoutine != null)
								{
									base.StopCoroutine(this.m_loadSubtitlesRoutine);
									this.m_loadSubtitlesRoutine = null;
								}
								this.m_loadSubtitlesRoutine = base.StartCoroutine(this.LoadSubtitlesCoroutine(platformFilePath, fileLocation, filePath));
							}
							else
							{
								string data = File.ReadAllText(platformFilePath);
								if (this.m_Subtitles.LoadSubtitlesSRT(data))
								{
									this.m_SubtitleLocation = fileLocation;
									this.m_SubtitlePath = filePath;
									this.m_LoadSubtitles = false;
									result = true;
								}
								else
								{
									GlobalData.Debug_LogError("[AVProVideo] Failed to load subtitles" + platformFilePath, this);
								}
							}
						}
						catch (Exception exception)
						{
							GlobalData.Debug_LogError("[AVProVideo] Failed to load subtitles " + platformFilePath, this);
							Debug.LogException(exception, this);
						}
					}
				}
				else
				{
					GlobalData.Debug_LogError("[AVProVideo] No subtitle file path specified", this);
				}
			}
			else
			{
				this.m_queueSubtitleLocation = fileLocation;
				this.m_queueSubtitlePath = filePath;
			}
			return result;
		}

		// Token: 0x060000E3 RID: 227 RVA: 0x00008B6C File Offset: 0x00006D6C
		private IEnumerator LoadSubtitlesCoroutine(string url, MediaPlayer.FileLocation fileLocation, string filePath)
		{
			WWW www = new WWW(url);
			yield return www;
			string subtitleData = string.Empty;
			if (string.IsNullOrEmpty(www.error))
			{
				subtitleData = www.text;
			}
			else
			{
				GlobalData.Debug_LogError("[AVProVideo] Error loading subtitles '" + www.error + "' from " + url);
			}
			if (this.m_Subtitles.LoadSubtitlesSRT(subtitleData))
			{
				this.m_SubtitleLocation = fileLocation;
				this.m_SubtitlePath = filePath;
				this.m_LoadSubtitles = false;
			}
			else
			{
				GlobalData.Debug_LogError("[AVProVideo] Failed to load subtitles" + url, this);
			}
			this.m_loadSubtitlesRoutine = null;
			yield break;
		}

		// Token: 0x060000E4 RID: 228 RVA: 0x00008B9C File Offset: 0x00006D9C
		public void DisableSubtitles()
		{
			if (this.m_loadSubtitlesRoutine != null)
			{
				base.StopCoroutine(this.m_loadSubtitlesRoutine);
				this.m_loadSubtitlesRoutine = null;
			}
			if (this.m_Subtitles != null)
			{
				this.m_previousSubtitleIndex = -1;
				this.m_LoadSubtitles = false;
				this.m_Subtitles.LoadSubtitlesSRT(string.Empty);
			}
			else
			{
				this.m_queueSubtitlePath = string.Empty;
			}
		}

		// Token: 0x060000E5 RID: 229 RVA: 0x00008C04 File Offset: 0x00006E04
		private bool OpenVideoFromBufferInternal(byte[] buffer)
		{
			bool result = false;
			if (this.m_Control != null)
			{
				this.CloseVideo();
				this.m_VideoOpened = true;
				this.m_AutoStartTriggered = !this.m_AutoStart;
				this.m_EventFired_MetaDataReady = false;
				this.m_EventFired_ReadyToPlay = false;
				this.m_EventFired_Started = false;
				this.m_EventFired_FirstFrameReady = false;
				this.m_previousSubtitleIndex = -1;
				Helper.LogInfo("Opening buffer of length " + buffer.Length, this);
				if (!this.m_Control.OpenVideoFromBuffer(buffer))
				{
					GlobalData.Debug_LogError("[AVProVideo] Failed to open buffer", this);
				}
				else
				{
					this.SetPlaybackOptions();
					result = true;
					this.StartRenderCoroutine();
				}
			}
			return result;
		}

		// Token: 0x060000E6 RID: 230 RVA: 0x00008CA8 File Offset: 0x00006EA8
		private bool OpenVideoFromFile()
		{
			bool result = false;
			if (this.m_Control != null)
			{
				this.CloseVideo();
				this.m_VideoOpened = true;
				this.m_AutoStartTriggered = !this.m_AutoStart;
				this.m_EventFired_MetaDataReady = false;
				this.m_EventFired_ReadyToPlay = false;
				this.m_EventFired_Started = false;
				this.m_EventFired_FirstFrameReady = false;
				this.m_previousSubtitleIndex = -1;
				long platformFileOffset = this.GetPlatformFileOffset();
				string platformFilePath = this.GetPlatformFilePath(MediaPlayer.GetPlatform(), ref this.m_VideoPath, ref this.m_VideoLocation);
				if (!string.IsNullOrEmpty(this.m_VideoPath))
				{
					string httpHeaderJson = null;
					bool flag = true;
					if (platformFilePath.Contains("://"))
					{
						flag = false;
						httpHeaderJson = this.GetPlatformHttpHeaderJson();
					}
					if (flag && !File.Exists(platformFilePath))
					{
						GlobalData.Debug_LogError("[AVProVideo] File not found: " + platformFilePath, this);
					}
					else
					{
						Helper.LogInfo(string.Concat(new object[]
						{
							"Opening ",
							platformFilePath,
							" (offset ",
							platformFileOffset,
							")"
						}), this);
						if (!this.m_Control.OpenVideoFromFile(platformFilePath, platformFileOffset, httpHeaderJson))
						{
							GlobalData.Debug_LogError("[AVProVideo] Failed to open " + platformFilePath, this);
						}
						else
						{
							this.SetPlaybackOptions();
							result = true;
							this.StartRenderCoroutine();
						}
					}
				}
				else
				{
					GlobalData.Debug_LogError("[AVProVideo] No file path specified", this);
				}
			}
			return result;
		}

		// Token: 0x060000E7 RID: 231 RVA: 0x00008DF8 File Offset: 0x00006FF8
		private void SetPlaybackOptions()
		{
			if (this.m_Control != null)
			{
				this.m_Control.SetLooping(this.m_Loop);
				this.m_Control.SetVolume(this.m_Volume);
				this.m_Control.SetBalance(this.m_Balance);
				this.m_Control.SetPlaybackRate(this.m_PlaybackRate);
				this.m_Control.MuteAudio(this.m_Muted);
				this.m_Control.SetTextureProperties(this.m_FilterMode, this.m_WrapMode, this.m_AnisoLevel);
			}
		}

		// Token: 0x060000E8 RID: 232 RVA: 0x00008E84 File Offset: 0x00007084
		public void CloseVideo()
		{
			if (this.m_Control != null)
			{
				if (this.m_events != null)
				{
					this.m_events.Invoke(this, MediaPlayerEvent.EventType.Closing, ErrorCode.None);
				}
				this.m_AutoStartTriggered = false;
				this.m_VideoOpened = false;
				this.m_EventFired_ReadyToPlay = false;
				this.m_EventFired_Started = false;
				this.m_EventFired_MetaDataReady = false;
				this.m_EventFired_FirstFrameReady = false;
				if (this.m_loadSubtitlesRoutine != null)
				{
					base.StopCoroutine(this.m_loadSubtitlesRoutine);
					this.m_loadSubtitlesRoutine = null;
				}
				this.m_previousSubtitleIndex = -1;
				this.m_isPlaybackStalled = false;
				this.m_Control.CloseVideo();
			}
			this.StopRenderCoroutine();
		}

		// Token: 0x060000E9 RID: 233 RVA: 0x00008F1C File Offset: 0x0000711C
		public void Play()
		{
			if (this.m_Control != null && this.m_Control.CanPlay())
			{
				this.m_Control.Play();
				this.m_EventFired_ReadyToPlay = true;
			}
			else
			{
				this.m_AutoStart = true;
			}
		}

		// Token: 0x060000EA RID: 234 RVA: 0x00008F58 File Offset: 0x00007158
		public void Pause()
		{
			if (this.m_Control != null && this.m_Control.IsPlaying())
			{
				this.m_Control.Pause();
			}
		}

		// Token: 0x060000EB RID: 235 RVA: 0x00008F80 File Offset: 0x00007180
		public void Stop()
		{
			if (this.m_Control != null)
			{
				this.m_Control.Stop();
			}
		}

		// Token: 0x060000EC RID: 236 RVA: 0x00008F98 File Offset: 0x00007198
		public void Rewind(bool pause)
		{
			if (this.m_Control != null)
			{
				if (pause)
				{
					this.Pause();
				}
				this.m_Control.Rewind();
			}
		}

		// Token: 0x060000ED RID: 237 RVA: 0x00008FBC File Offset: 0x000071BC
		private void Update()
		{
			if (this.m_Control != null)
			{
				if (this.m_VideoOpened && this.m_AutoStart && !this.m_AutoStartTriggered && this.m_Control.CanPlay())
				{
					this.m_AutoStartTriggered = true;
					this.Play();
				}
				if (this._renderingCoroutine == null && this.m_Control.CanPlay())
				{
					this.StartRenderCoroutine();
				}
				if (this.m_Subtitles != null && !string.IsNullOrEmpty(this.m_queueSubtitlePath))
				{
					this.EnableSubtitles(this.m_queueSubtitleLocation, this.m_queueSubtitlePath);
					this.m_queueSubtitlePath = string.Empty;
				}
				this.m_Player.Update();
				this.UpdateErrors();
				this.UpdateEvents();
			}
		}

		// Token: 0x060000EE RID: 238 RVA: 0x00009084 File Offset: 0x00007284
		private void OnEnable()
		{
			if (this.m_Control != null && this.m_WasPlayingOnPause)
			{
				this.m_AutoStart = true;
				this.m_AutoStartTriggered = false;
				this.m_WasPlayingOnPause = false;
			}
			if (this.m_Player != null)
			{
				this.m_Player.OnEnable();
			}
			this.StartRenderCoroutine();
		}

		// Token: 0x060000EF RID: 239 RVA: 0x000090D8 File Offset: 0x000072D8
		private void OnDisable()
		{
			if (this.m_Control != null && this.m_Control.IsPlaying())
			{
				this.m_WasPlayingOnPause = true;
				this.Pause();
			}
			this.StopRenderCoroutine();
		}

		// Token: 0x060000F0 RID: 240 RVA: 0x00009108 File Offset: 0x00007308
		private void OnDestroy()
		{
			this.CloseVideo();
			if (this.m_Dispose != null)
			{
				this.m_Dispose.Dispose();
				this.m_Dispose = null;
			}
			this.m_Control = null;
			this.m_Texture = null;
			this.m_Info = null;
			this.m_Player = null;
		}

		// Token: 0x060000F1 RID: 241 RVA: 0x00009154 File Offset: 0x00007354
		private void OnApplicationQuit()
		{
			if (MediaPlayer.s_GlobalStartup)
			{
				Helper.LogInfo("Shutdown", null);
				MediaPlayer[] array = Resources.FindObjectsOfTypeAll<MediaPlayer>();
				if (array != null && array.Length > 0)
				{
					for (int i = 0; i < array.Length; i++)
					{
						array[i].CloseVideo();
					}
				}
				WindowsMediaPlayer.DeinitPlatform();
				MediaPlayer.s_GlobalStartup = false;
			}
		}

		// Token: 0x060000F2 RID: 242 RVA: 0x000091B4 File Offset: 0x000073B4
		private void StartRenderCoroutine()
		{
			if (this._renderingCoroutine == null)
			{
				this._renderingCoroutine = base.StartCoroutine(this.FinalRenderCapture());
			}
		}

		// Token: 0x060000F3 RID: 243 RVA: 0x000091D4 File Offset: 0x000073D4
		private void StopRenderCoroutine()
		{
			if (this._renderingCoroutine != null)
			{
				base.StopCoroutine(this._renderingCoroutine);
				this._renderingCoroutine = null;
			}
		}

		// Token: 0x060000F4 RID: 244 RVA: 0x000091F4 File Offset: 0x000073F4
		private IEnumerator FinalRenderCapture()
		{
			YieldInstruction wait = new WaitForEndOfFrame();
			while (Application.isPlaying)
			{
				yield return wait;
				if (base.enabled && this.m_Player != null)
				{
					this.m_Player.Render();
				}
			}
			yield break;
		}

		// Token: 0x060000F5 RID: 245 RVA: 0x00009210 File Offset: 0x00007410
		public static Platform GetPlatform()
		{
			return Platform.Windows;
		}

		// Token: 0x060000F6 RID: 246 RVA: 0x00009224 File Offset: 0x00007424
		public MediaPlayer.PlatformOptions GetCurrentPlatformOptions()
		{
			return this._optionsWindows;
		}

		// Token: 0x060000F7 RID: 247 RVA: 0x0000923C File Offset: 0x0000743C
		public static string GetPath(MediaPlayer.FileLocation location)
		{
			string text = string.Empty;
			switch (location)
			{
			case MediaPlayer.FileLocation.RelativeToProjectFolder:
			{
				string path = "..";
				text = Path.GetFullPath(Path.Combine(Application.dataPath, path));
				text = text.Replace('\\', '/');
				break;
			}
			case MediaPlayer.FileLocation.RelativeToStreamingAssetsFolder:
				text = Application.streamingAssetsPath;
				break;
			case MediaPlayer.FileLocation.RelativeToDataFolder:
				text = Application.dataPath;
				break;
			case MediaPlayer.FileLocation.RelativeToPeristentDataFolder:
				text = Application.persistentDataPath;
				break;
			}
			return text;
		}

		// Token: 0x060000F8 RID: 248 RVA: 0x000092BC File Offset: 0x000074BC
		public static string GetFilePath(string path, MediaPlayer.FileLocation location)
		{
			string result = string.Empty;
			if (!string.IsNullOrEmpty(path))
			{
				switch (location)
				{
				case MediaPlayer.FileLocation.AbsolutePathOrURL:
					result = path;
					break;
				case MediaPlayer.FileLocation.RelativeToProjectFolder:
				case MediaPlayer.FileLocation.RelativeToStreamingAssetsFolder:
				case MediaPlayer.FileLocation.RelativeToDataFolder:
				case MediaPlayer.FileLocation.RelativeToPeristentDataFolder:
					result = Path.Combine(MediaPlayer.GetPath(location), path);
					break;
				}
			}
			return result;
		}

		// Token: 0x060000F9 RID: 249 RVA: 0x00009314 File Offset: 0x00007514
		private long GetPlatformFileOffset()
		{
			return 0L;
		}

		// Token: 0x060000FA RID: 250 RVA: 0x00009328 File Offset: 0x00007528
		private string GetPlatformHttpHeaderJson()
		{
			string text = null;
			if (!string.IsNullOrEmpty(text))
			{
				text = text.Trim();
			}
			return text;
		}

		// Token: 0x060000FB RID: 251 RVA: 0x0000934C File Offset: 0x0000754C
		private string GetPlatformFilePath(Platform platform, ref string filePath, ref MediaPlayer.FileLocation fileLocation)
		{
			string empty = string.Empty;
			if (platform != Platform.Unknown)
			{
				MediaPlayer.PlatformOptions currentPlatformOptions = this.GetCurrentPlatformOptions();
				if (currentPlatformOptions != null && currentPlatformOptions.overridePath)
				{
					filePath = currentPlatformOptions.path;
					fileLocation = currentPlatformOptions.pathLocation;
				}
			}
			return MediaPlayer.GetFilePath(filePath, fileLocation);
		}

		// Token: 0x060000FC RID: 252 RVA: 0x0000939C File Offset: 0x0000759C
		public virtual BaseMediaPlayer CreatePlatformMediaPlayer()
		{
			WindowsMediaPlayer.InitialisePlatform();
			BaseMediaPlayer baseMediaPlayer = new WindowsMediaPlayer(this._optionsWindows.videoApi, this._optionsWindows.useHardwareDecoding, this._optionsWindows.useTextureMips, this._optionsWindows.forceAudioOutputDeviceName, this._optionsWindows.useUnityAudio, this._optionsWindows.forceAudioResample, this._optionsWindows.desiredAudioChannels);
			if (baseMediaPlayer == null)
			{
				GlobalData.Debug_LogError(string.Format("[AVProVideo] Not supported on this platform {0} {1} {2} {3}.  Using null media player!", new object[]
				{
					Application.platform,
					SystemInfo.deviceModel,
					SystemInfo.processorType,
					SystemInfo.operatingSystem
				}));
				baseMediaPlayer = new NullMediaPlayer();
			}
			return baseMediaPlayer;
		}

		// Token: 0x060000FD RID: 253 RVA: 0x0000944C File Offset: 0x0000764C
		private bool ForceWaitForNewFrame(int lastFrameCount, float timeoutMs)
		{
			bool result = false;
			DateTime now = DateTime.Now;
			int num = 0;
			while (this.Control != null && (DateTime.Now - now).TotalMilliseconds < (double)timeoutMs)
			{
				this.m_Player.Update();
				if (lastFrameCount != this.TextureProducer.GetTextureFrameCount())
				{
					result = true;
					break;
				}
				num++;
			}
			this.m_Player.Render();
			return result;
		}

		// Token: 0x060000FE RID: 254 RVA: 0x000094C0 File Offset: 0x000076C0
		private void UpdateErrors()
		{
			ErrorCode lastError = this.m_Control.GetLastError();
			if (lastError != ErrorCode.None)
			{
				GlobalData.Debug_LogError("[AVProVideo] Error: " + Helper.GetErrorMessage(lastError));
				if (this.m_events != null)
				{
					this.m_events.Invoke(this, MediaPlayerEvent.EventType.Error, lastError);
				}
			}
		}

		// Token: 0x060000FF RID: 255 RVA: 0x00009510 File Offset: 0x00007710
		private void UpdateEvents()
		{
			if (this.m_events != null && this.m_Control != null)
			{
				this.m_EventFired_FinishedPlaying = this.FireEventIfPossible(MediaPlayerEvent.EventType.FinishedPlaying, this.m_EventFired_FinishedPlaying);
				if (this.m_EventFired_Started && this.m_Control != null && !this.m_Control.IsPlaying())
				{
					this.m_EventFired_Started = false;
				}
				if (this.m_EventFired_FinishedPlaying && this.m_Control != null && this.m_Control.IsPlaying() && !this.m_Control.IsFinished())
				{
					bool flag = false;
					float num = 1000f / this.m_Info.GetVideoFrameRate();
					if (this.m_Info.GetDurationMs() - this.m_Control.GetCurrentTimeMs() > num)
					{
						flag = true;
					}
					if (flag)
					{
						this.m_EventFired_FinishedPlaying = false;
					}
				}
				this.m_EventFired_MetaDataReady = this.FireEventIfPossible(MediaPlayerEvent.EventType.MetaDataReady, this.m_EventFired_MetaDataReady);
				this.m_EventFired_ReadyToPlay = this.FireEventIfPossible(MediaPlayerEvent.EventType.ReadyToPlay, this.m_EventFired_ReadyToPlay);
				this.m_EventFired_Started = this.FireEventIfPossible(MediaPlayerEvent.EventType.Started, this.m_EventFired_Started);
				this.m_EventFired_FirstFrameReady = this.FireEventIfPossible(MediaPlayerEvent.EventType.FirstFrameReady, this.m_EventFired_FirstFrameReady);
				if (this.FireEventIfPossible(MediaPlayerEvent.EventType.SubtitleChange, false))
				{
					this.m_previousSubtitleIndex = this.m_Subtitles.GetSubtitleIndex();
				}
				bool flag2 = this.m_Info.IsPlaybackStalled();
				if (flag2 != this.m_isPlaybackStalled)
				{
					this.m_isPlaybackStalled = flag2;
					MediaPlayerEvent.EventType eventType = (!this.m_isPlaybackStalled) ? MediaPlayerEvent.EventType.Unstalled : MediaPlayerEvent.EventType.Stalled;
					this.FireEventIfPossible(eventType, false);
				}
			}
		}

		// Token: 0x06000100 RID: 256 RVA: 0x00009694 File Offset: 0x00007894
		private bool FireEventIfPossible(MediaPlayerEvent.EventType eventType, bool hasFired)
		{
			if (this.CanFireEvent(eventType, hasFired))
			{
				hasFired = true;
				this.m_events.Invoke(this, eventType, ErrorCode.None);
			}
			return hasFired;
		}

		// Token: 0x06000101 RID: 257 RVA: 0x000096B8 File Offset: 0x000078B8
		private bool CanFireEvent(MediaPlayerEvent.EventType et, bool hasFired)
		{
			bool result = false;
			if (this.m_events != null && this.m_Control != null && !hasFired)
			{
				switch (et)
				{
				case MediaPlayerEvent.EventType.MetaDataReady:
					result = this.m_Control.HasMetaData();
					break;
				case MediaPlayerEvent.EventType.ReadyToPlay:
					result = (!this.m_Control.IsPlaying() && this.m_Control.CanPlay() && !this.m_AutoStart);
					break;
				case MediaPlayerEvent.EventType.Started:
					result = this.m_Control.IsPlaying();
					break;
				case MediaPlayerEvent.EventType.FirstFrameReady:
					result = (this.m_Texture != null && this.m_Control.CanPlay() && this.m_Texture.GetTextureFrameCount() > 0);
					break;
				case MediaPlayerEvent.EventType.FinishedPlaying:
					result = ((!this.m_Control.IsLooping() && this.m_Control.CanPlay() && this.m_Control.IsFinished()) || (this.m_Control.GetCurrentTimeMs() > this.m_Info.GetDurationMs() && !this.m_Control.IsLooping()));
					break;
				case MediaPlayerEvent.EventType.SubtitleChange:
					result = (this.m_previousSubtitleIndex != this.m_Subtitles.GetSubtitleIndex());
					break;
				case MediaPlayerEvent.EventType.Stalled:
					result = this.m_Info.IsPlaybackStalled();
					break;
				case MediaPlayerEvent.EventType.Unstalled:
					result = !this.m_Info.IsPlaybackStalled();
					break;
				}
			}
			return result;
		}

		// Token: 0x06000102 RID: 258 RVA: 0x00009844 File Offset: 0x00007A44
		private void OnApplicationFocus(bool focusStatus)
		{
		}

		// Token: 0x06000103 RID: 259 RVA: 0x00009848 File Offset: 0x00007A48
		private void OnApplicationPause(bool pauseStatus)
		{
		}

		// Token: 0x06000104 RID: 260 RVA: 0x0000984C File Offset: 0x00007A4C
		[ContextMenu("Save Frame To PNG")]
		public void SaveFrameToPng()
		{
			Texture2D texture2D = this.ExtractFrame(null, -1f, true, 1000);
			if (texture2D != null)
			{
				byte[] array = texture2D.EncodeToPNG();
				if (array != null)
				{
					string str = Mathf.FloorToInt(this.Control.GetCurrentTimeMs()).ToString("D8");
					File.WriteAllBytes("frame-" + str + ".png", array);
				}
				UnityEngine.Object.Destroy(texture2D);
			}
		}

		// Token: 0x06000105 RID: 261 RVA: 0x000098C0 File Offset: 0x00007AC0
		public Texture2D ExtractFrame(Texture2D target, float timeSeconds = -1f, bool accurateSeek = true, int timeoutMs = 1000)
		{
			Texture2D result = target;
			Texture texture = this.ExtractFrame(timeSeconds, accurateSeek, timeoutMs);
			if (texture != null)
			{
				result = Helper.GetReadableTexture(texture, this.TextureProducer.RequiresVerticalFlip(), Helper.GetOrientation(this.Info.GetTextureTransform()), target);
			}
			return result;
		}

		// Token: 0x06000106 RID: 262 RVA: 0x0000990C File Offset: 0x00007B0C
		private Texture ExtractFrame(float timeSeconds = -1f, bool accurateSeek = true, int timeoutMs = 1000)
		{
			Texture result = null;
			if (this.m_Control != null)
			{
				if (timeSeconds >= 0f)
				{
					this.Pause();
					float num = timeSeconds * 1000f;
					if (this.TextureProducer.GetTexture(0) != null && this.m_Control.GetCurrentTimeMs() == num)
					{
						result = this.TextureProducer.GetTexture(0);
					}
					else
					{
						int textureFrameCount = this.TextureProducer.GetTextureFrameCount();
						if (accurateSeek)
						{
							this.m_Control.Seek(num);
						}
						else
						{
							this.m_Control.SeekFast(num);
						}
						this.ForceWaitForNewFrame(textureFrameCount, (float)timeoutMs);
						result = this.TextureProducer.GetTexture(0);
					}
				}
				else
				{
					result = this.TextureProducer.GetTexture(0);
				}
			}
			return result;
		}

		// Token: 0x06000107 RID: 263 RVA: 0x000099D4 File Offset: 0x00007BD4
		public void SetGuiPositionFromVideoIndex(int index)
		{
			this.m_GuiPositionX = Mathf.FloorToInt(15f + (float)(180 * index) * 1.5f);
		}

		// Token: 0x06000108 RID: 264 RVA: 0x000099F8 File Offset: 0x00007BF8
		public void SetDebugGuiEnabled(bool bEnabled)
		{
			this.m_DebugGui = bEnabled;
		}

		// Token: 0x06000109 RID: 265 RVA: 0x00009A04 File Offset: 0x00007C04
		private void OnGUI()
		{
			if (this.m_Info != null && this.m_DebugGui)
			{
				GUI.depth = -1000;
				GUI.matrix = Matrix4x4.TRS(new Vector3((float)this.m_GuiPositionX, 10f, 0f), Quaternion.identity, new Vector3(1.5f, 1.5f, 1f));
				GUILayout.BeginVertical("box", new GUILayoutOption[]
				{
					GUILayout.MaxWidth(180f)
				});
				GUILayout.Label(Path.GetFileName(this.m_VideoPath), new GUILayoutOption[0]);
				GUILayout.Label(string.Concat(new object[]
				{
					"Dimensions: ",
					this.m_Info.GetVideoWidth(),
					"x",
					this.m_Info.GetVideoHeight(),
					"@",
					this.m_Info.GetVideoFrameRate().ToString("F2")
				}), new GUILayoutOption[0]);
				GUILayout.Label(string.Concat(new string[]
				{
					"Time: ",
					(this.m_Control.GetCurrentTimeMs() * 0.001f).ToString("F1"),
					"s / ",
					(this.m_Info.GetDurationMs() * 0.001f).ToString("F1"),
					"s"
				}), new GUILayoutOption[0]);
				GUILayout.Label("Rate: " + this.m_Info.GetVideoDisplayRate().ToString("F2") + "Hz", new GUILayoutOption[0]);
				if (this.TextureProducer != null && this.TextureProducer.GetTexture(0) != null)
				{
					GUILayout.BeginHorizontal(new GUILayoutOption[0]);
					Rect rect = GUILayoutUtility.GetRect(32f, 32f);
					GUILayout.Space(8f);
					Rect rect2 = GUILayoutUtility.GetRect(32f, 32f);
					Matrix4x4 matrix = GUI.matrix;
					if (this.TextureProducer.RequiresVerticalFlip())
					{
						GUIUtility.ScaleAroundPivot(new Vector2(1f, -1f), new Vector2(0f, rect.y + rect.height / 2f));
					}
					GUI.DrawTexture(rect, this.TextureProducer.GetTexture(0), ScaleMode.ScaleToFit, false);
					GUI.DrawTexture(rect2, this.TextureProducer.GetTexture(0), ScaleMode.ScaleToFit, true);
					GUI.matrix = matrix;
					GUILayout.FlexibleSpace();
					GUILayout.EndHorizontal();
				}
				if (this.m_DebugGuiControls)
				{
					GUILayout.BeginHorizontal(new GUILayoutOption[0]);
					if (this.m_Control.IsPaused())
					{
						if (GUILayout.Button("Play", new GUILayoutOption[]
						{
							GUILayout.Width(50f)
						}))
						{
							this.m_Control.Play();
						}
					}
					else if (GUILayout.Button("Pause", new GUILayoutOption[]
					{
						GUILayout.Width(50f)
					}))
					{
						this.m_Control.Pause();
					}
					float durationMs = this.m_Info.GetDurationMs();
					float currentTimeMs = this.m_Control.GetCurrentTimeMs();
					float num = GUILayout.HorizontalSlider(currentTimeMs, 0f, durationMs, new GUILayoutOption[0]);
					if (num != currentTimeMs)
					{
						this.m_Control.Seek(num);
					}
					GUILayout.EndHorizontal();
				}
				GUILayout.EndVertical();
			}
		}

		// Token: 0x040000CC RID: 204
		public MediaPlayer.FileLocation m_VideoLocation = MediaPlayer.FileLocation.RelativeToStreamingAssetsFolder;

		// Token: 0x040000CD RID: 205
		public string m_VideoPath;

		// Token: 0x040000CE RID: 206
		public bool m_AutoOpen = true;

		// Token: 0x040000CF RID: 207
		public bool m_AutoStart = true;

		// Token: 0x040000D0 RID: 208
		public bool m_Loop;

		// Token: 0x040000D1 RID: 209
		[Range(0f, 1f)]
		public float m_Volume = 1f;

		// Token: 0x040000D2 RID: 210
		[Range(-1f, 1f)]
		[SerializeField]
		private float m_Balance;

		// Token: 0x040000D3 RID: 211
		public bool m_Muted;

		// Token: 0x040000D4 RID: 212
		[Range(-4f, 4f)]
		[SerializeField]
		public float m_PlaybackRate = 1f;

		// Token: 0x040000D5 RID: 213
		[SerializeField]
		private bool m_DebugGui;

		// Token: 0x040000D6 RID: 214
		[SerializeField]
		private bool m_DebugGuiControls = true;

		// Token: 0x040000D7 RID: 215
		[SerializeField]
		private bool m_Persistent;

		// Token: 0x040000D8 RID: 216
		public StereoPacking m_StereoPacking;

		// Token: 0x040000D9 RID: 217
		public AlphaPacking m_AlphaPacking;

		// Token: 0x040000DA RID: 218
		public bool m_DisplayDebugStereoColorTint;

		// Token: 0x040000DB RID: 219
		public FilterMode m_FilterMode = FilterMode.Bilinear;

		// Token: 0x040000DC RID: 220
		public TextureWrapMode m_WrapMode = TextureWrapMode.Clamp;

		// Token: 0x040000DD RID: 221
		[Range(0f, 16f)]
		public int m_AnisoLevel;

		// Token: 0x040000DE RID: 222
		[SerializeField]
		private bool m_LoadSubtitles;

		// Token: 0x040000DF RID: 223
		[SerializeField]
		private MediaPlayer.FileLocation m_SubtitleLocation = MediaPlayer.FileLocation.RelativeToStreamingAssetsFolder;

		// Token: 0x040000E0 RID: 224
		private MediaPlayer.FileLocation m_queueSubtitleLocation;

		// Token: 0x040000E1 RID: 225
		[SerializeField]
		private string m_SubtitlePath;

		// Token: 0x040000E2 RID: 226
		private string m_queueSubtitlePath;

		// Token: 0x040000E3 RID: 227
		private Coroutine m_loadSubtitlesRoutine;

		// Token: 0x040000E4 RID: 228
		[SerializeField]
		private MediaPlayerEvent m_events;

		// Token: 0x040000E5 RID: 229
		private IMediaControl m_Control;

		// Token: 0x040000E6 RID: 230
		private IMediaProducer m_Texture;

		// Token: 0x040000E7 RID: 231
		private IMediaInfo m_Info;

		// Token: 0x040000E8 RID: 232
		private IMediaPlayer m_Player;

		// Token: 0x040000E9 RID: 233
		private IMediaSubtitles m_Subtitles;

		// Token: 0x040000EA RID: 234
		private IDisposable m_Dispose;

		// Token: 0x040000EB RID: 235
		private bool m_VideoOpened;

		// Token: 0x040000EC RID: 236
		private bool m_AutoStartTriggered;

		// Token: 0x040000ED RID: 237
		private bool m_WasPlayingOnPause;

		// Token: 0x040000EE RID: 238
		private Coroutine _renderingCoroutine;

		// Token: 0x040000EF RID: 239
		private const int s_GuiDepth = -1000;

		// Token: 0x040000F0 RID: 240
		private const float s_GuiScale = 1.5f;

		// Token: 0x040000F1 RID: 241
		private const int s_GuiStartWidth = 10;

		// Token: 0x040000F2 RID: 242
		private const int s_GuiWidth = 180;

		// Token: 0x040000F3 RID: 243
		private int m_GuiPositionX = 10;

		// Token: 0x040000F4 RID: 244
		private static bool s_GlobalStartup;

		// Token: 0x040000F5 RID: 245
		private bool m_EventFired_ReadyToPlay;

		// Token: 0x040000F6 RID: 246
		private bool m_EventFired_Started;

		// Token: 0x040000F7 RID: 247
		private bool m_EventFired_FirstFrameReady;

		// Token: 0x040000F8 RID: 248
		private bool m_EventFired_FinishedPlaying;

		// Token: 0x040000F9 RID: 249
		private bool m_EventFired_MetaDataReady;

		// Token: 0x040000FA RID: 250
		private int m_previousSubtitleIndex = -1;

		// Token: 0x040000FB RID: 251
		private bool m_isPlaybackStalled;

		// Token: 0x040000FC RID: 252
		[SerializeField]
		private MediaPlayer.OptionsWindows _optionsWindows = new MediaPlayer.OptionsWindows();

		// Token: 0x040000FD RID: 253
		[SerializeField]
		private MediaPlayer.OptionsMacOSX _optionsMacOSX = new MediaPlayer.OptionsMacOSX();

		// Token: 0x040000FE RID: 254
		[SerializeField]
		private MediaPlayer.OptionsIOS _optionsIOS = new MediaPlayer.OptionsIOS();

		// Token: 0x040000FF RID: 255
		[SerializeField]
		private MediaPlayer.OptionsTVOS _optionsTVOS = new MediaPlayer.OptionsTVOS();

		// Token: 0x04000100 RID: 256
		[SerializeField]
		private MediaPlayer.OptionsAndroid _optionsAndroid = new MediaPlayer.OptionsAndroid();

		// Token: 0x04000101 RID: 257
		[SerializeField]
		private MediaPlayer.OptionsWindowsPhone _optionsWindowsPhone = new MediaPlayer.OptionsWindowsPhone();

		// Token: 0x04000102 RID: 258
		[SerializeField]
		private MediaPlayer.OptionsWindowsUWP _optionsWindowsUWP = new MediaPlayer.OptionsWindowsUWP();

		// Token: 0x04000103 RID: 259
		[SerializeField]
		private MediaPlayer.OptionsWebGL _optionsWebGL = new MediaPlayer.OptionsWebGL();

		// Token: 0x02000020 RID: 32
		[Serializable]
		public class Setup
		{
			// Token: 0x04000104 RID: 260
			public bool displayDebugGUI;

			// Token: 0x04000105 RID: 261
			public bool persistent;
		}

		// Token: 0x02000021 RID: 33
		public enum FileLocation
		{
			// Token: 0x04000107 RID: 263
			AbsolutePathOrURL,
			// Token: 0x04000108 RID: 264
			RelativeToProjectFolder,
			// Token: 0x04000109 RID: 265
			RelativeToStreamingAssetsFolder,
			// Token: 0x0400010A RID: 266
			RelativeToDataFolder,
			// Token: 0x0400010B RID: 267
			RelativeToPeristentDataFolder
		}

		// Token: 0x02000022 RID: 34
		[Serializable]
		public class PlatformOptions
		{
			// Token: 0x0600010D RID: 269 RVA: 0x00009D84 File Offset: 0x00007F84
			public virtual bool IsModified()
			{
				return this.overridePath;
			}

			// Token: 0x0400010C RID: 268
			public bool overridePath;

			// Token: 0x0400010D RID: 269
			public MediaPlayer.FileLocation pathLocation = MediaPlayer.FileLocation.RelativeToStreamingAssetsFolder;

			// Token: 0x0400010E RID: 270
			public string path;
		}

		// Token: 0x02000023 RID: 35
		[Serializable]
		public class OptionsWindows : MediaPlayer.PlatformOptions
		{
			// Token: 0x0600010F RID: 271 RVA: 0x00009DB4 File Offset: 0x00007FB4
			public override bool IsModified()
			{
				return base.IsModified() || !this.useHardwareDecoding || this.useTextureMips || this.useUnityAudio || this.videoApi != Windows.VideoApi.MediaFoundation || !this.forceAudioResample || this.desiredAudioChannels != 2;
			}

			// Token: 0x0400010F RID: 271
			public Windows.VideoApi videoApi;

			// Token: 0x04000110 RID: 272
			public bool useHardwareDecoding = true;

			// Token: 0x04000111 RID: 273
			public bool useUnityAudio;

			// Token: 0x04000112 RID: 274
			public bool forceAudioResample = true;

			// Token: 0x04000113 RID: 275
			public int desiredAudioChannels = 2;

			// Token: 0x04000114 RID: 276
			public bool useTextureMips;

			// Token: 0x04000115 RID: 277
			public string forceAudioOutputDeviceName = string.Empty;
		}

		// Token: 0x02000024 RID: 36
		[Serializable]
		public class OptionsMacOSX : MediaPlayer.PlatformOptions
		{
			// Token: 0x06000111 RID: 273 RVA: 0x00009E1C File Offset: 0x0000801C
			public override bool IsModified()
			{
				return base.IsModified() || !string.IsNullOrEmpty(this.httpHeaderJson);
			}

			// Token: 0x04000116 RID: 278
			[Multiline]
			public string httpHeaderJson;
		}

		// Token: 0x02000025 RID: 37
		[Serializable]
		public class OptionsIOS : MediaPlayer.PlatformOptions
		{
			// Token: 0x06000113 RID: 275 RVA: 0x00009E44 File Offset: 0x00008044
			public override bool IsModified()
			{
				return base.IsModified() || !string.IsNullOrEmpty(this.httpHeaderJson) || this.useYpCbCr420Textures;
			}

			// Token: 0x04000117 RID: 279
			public bool useYpCbCr420Textures;

			// Token: 0x04000118 RID: 280
			[Multiline]
			public string httpHeaderJson;
		}

		// Token: 0x02000026 RID: 38
		[Serializable]
		public class OptionsTVOS : MediaPlayer.PlatformOptions
		{
			// Token: 0x06000115 RID: 277 RVA: 0x00009E74 File Offset: 0x00008074
			public override bool IsModified()
			{
				return base.IsModified() || !string.IsNullOrEmpty(this.httpHeaderJson) || this.useYpCbCr420Textures;
			}

			// Token: 0x04000119 RID: 281
			public bool useYpCbCr420Textures;

			// Token: 0x0400011A RID: 282
			[Multiline]
			public string httpHeaderJson;
		}

		// Token: 0x02000027 RID: 39
		[Serializable]
		public class OptionsAndroid : MediaPlayer.PlatformOptions
		{
			// Token: 0x06000117 RID: 279 RVA: 0x00009EA4 File Offset: 0x000080A4
			public override bool IsModified()
			{
				return base.IsModified() || this.fileOffset != 0 || this.useFastOesPath || this.showPosterFrame || !string.IsNullOrEmpty(this.httpHeaderJson);
			}

			// Token: 0x0400011B RID: 283
			public bool useFastOesPath;

			// Token: 0x0400011C RID: 284
			public bool showPosterFrame;

			// Token: 0x0400011D RID: 285
			[Multiline]
			public string httpHeaderJson;

			// Token: 0x0400011E RID: 286
			[SerializeField]
			public int fileOffset;
		}

		// Token: 0x02000028 RID: 40
		[Serializable]
		public class OptionsWindowsPhone : MediaPlayer.PlatformOptions
		{
			// Token: 0x06000119 RID: 281 RVA: 0x00009F04 File Offset: 0x00008104
			public override bool IsModified()
			{
				return base.IsModified() || !this.useHardwareDecoding || this.useTextureMips || this.useUnityAudio || !this.forceAudioResample || this.desiredAudioChannels != 2;
			}

			// Token: 0x0400011F RID: 287
			public bool useHardwareDecoding = true;

			// Token: 0x04000120 RID: 288
			public bool useUnityAudio;

			// Token: 0x04000121 RID: 289
			public bool forceAudioResample = true;

			// Token: 0x04000122 RID: 290
			public int desiredAudioChannels = 2;

			// Token: 0x04000123 RID: 291
			public bool useTextureMips;
		}

		// Token: 0x02000029 RID: 41
		[Serializable]
		public class OptionsWindowsUWP : MediaPlayer.PlatformOptions
		{
			// Token: 0x0600011B RID: 283 RVA: 0x00009F78 File Offset: 0x00008178
			public override bool IsModified()
			{
				return base.IsModified() || !this.useHardwareDecoding || this.useTextureMips || this.useUnityAudio || !this.forceAudioResample || this.desiredAudioChannels != 2;
			}

			// Token: 0x04000124 RID: 292
			public bool useHardwareDecoding = true;

			// Token: 0x04000125 RID: 293
			public bool useUnityAudio;

			// Token: 0x04000126 RID: 294
			public bool forceAudioResample = true;

			// Token: 0x04000127 RID: 295
			public int desiredAudioChannels = 2;

			// Token: 0x04000128 RID: 296
			public bool useTextureMips;
		}

		// Token: 0x0200002A RID: 42
		[Serializable]
		public class OptionsWebGL : MediaPlayer.PlatformOptions
		{
		}
	}
}
